######################################################
###Manuscript Figure 1 ###############################
######################################################
t1_m1 <- lm(supp_dem2 ~ unauthorised + age + gender +education, data = dat)
t1_m2 <- lm(supp_dem2 ~ violent     + age + gender + education, data = dat)
t1_m3 <- lm(supp_dem2 ~ arrest      + age + gender + education, data = dat)
t1_m4 <- lm(part_dummy2 ~ unauthorised + age + gender +education, data = dat)
t1_m5 <- lm(part_dummy2 ~ violent     + age + gender + education, data = dat)
t1_m6 <- lm(part_dummy2 ~ arrest      + age + gender + education, data = dat)

figure1A<-plot_summs(t1_m1, t1_m2, t1_m3,
                     coefs = c("Protest Unauthorized" = "unauthorised", "Protesters Violent" = "violent",
                               "Protesters Arrested" = "arrest"), color.class = "Greys",
                     scale = TRUE, robust = FALSE)
figure1A

apatheme= theme_apa(
  legend.pos = "",
  legend.use.title = FALSE,
  legend.font.size = 12,
  x.font.size = 12,
  y.font.size = 19,
  facet.title.size = 10,
  remove.y.gridlines = TRUE,
  remove.x.gridlines = TRUE
)

Figure1A<-figure1A  + apatheme + theme(axis.text = element_text(size =16)) + theme(axis.title.x = element_text(size=17)) + labs(x = "Change in protester approval", y = "")  
###
figure1B<-plot_summs(t1_m4, t1_m5, t1_m6,
                     coefs = c("Protest Unauthorized" = "unauthorised", "Protesters Violent" = "violent",
                               "Protesters Arrested" = "arrest"), color.class = "Greys",
                     scale = TRUE, robust = FALSE)
figure1B

apatheme= theme_apa(
  legend.pos = "",
  legend.use.title = FALSE,
  legend.font.size = 12,
  x.font.size = 12,
  y.font.size = 19,
  facet.title.size = 10,
  remove.y.gridlines = TRUE,
  remove.x.gridlines = TRUE
)
Figure1B<-figure1B  + apatheme + theme(axis.text = element_text(size =16)) + theme(axis.title.x = element_text(size=17)) + labs(x = "Change in protest support", y = "")  

ggsave(height=5,
       width=12,
       "Figures/Figure_1.pdf",
       arrangeGrob(Figure1A, Figure1B, ncol=2)
)
